package com.xiaoyezi.demo2.mapper;

import java.util.List;
import com.xiaoyezi.demo2.DataSource.User;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;


@Mapper     // Mapper会在运行时自动生成实现类对象（代理对象），并且将该对象交给IOC容器
public interface UserMapper {
    @Select("select * from user_table")
    public List<User> selectList();

   @Insert("insert into user_table(zhanghao,password,category,create_time,update_time) " +
           "values(#{zhanghao},#{password},#{category},#{createTime},#{updateTime})")
    public void insertList(User user);
}


